import { lazy } from "react";
import { Navigate } from "react-router-dom";
// 底部tabbar页面路由配置文件
import RouterChildrenList from "./children";
// 底部tabbar微脉路由
import HomeRouterList from "./HomeRouter";
// 底部tabbar寻医路由
import SeekingMedicalAttention from "./SeekingMedicalAttention";
// 底部tabbar直播路由
import livebroadcastRouter from "./livebroadcastRouter";
// 底部tabbar健康商城路由
import HealthMallRouter from "./HealthMallRouter";

const Login = lazy(() => import("../pages/Login"));
const Sigin = lazy(() => import("../pages/Sigin"));
const Home = lazy(() => import("../pages/Home"));

const Cart = lazy(() => import("../pages/Cart"));

const Chu = lazy(() => import("../pages/Chu"));
const Zi = lazy(() => import("../pages/Zi"));
const Kang = lazy(() => import("../pages/Kang"));
const Cang = lazy(() => import("../pages/Cang"));
const Fen = lazy(() => import("../pages/Fen"));
// 商城搜索
const ShopSearch = lazy(() => import("../pages/ShopSearch"));

const AlldepartmentsItem = lazy(() => import("../pages/AlldepartmentsItem"));

const AskPage = lazy(() => import("../pages/AskPage"));
const WatchVideo = lazy(() => import("../pages/WatchVideo"));

const Kf = lazy(() => import("../pages/Kf"));
const Sao = lazy(() => import("../pages/Sao"));
const Putaway = lazy(() => import("../pages/Putaway"));
const Grounds = lazy(() => import("../pages/Grounds"));
const Wallet = lazy(() => import("../pages/Wallet"));
const Sleep = lazy(() => import("../pages/Sleep"));
const Monitor = lazy(() => import("../pages/Monitor"));
const Health = lazy(() => import("../pages/Health"));
const Blood = lazy(() => import("../pages/Blood"));
const Asthma = lazy(() => import("../pages/Asthma"));
const Device = lazy(() => import("../pages/Device"));
const Butler = lazy(() => import("../pages/Butler"));
const One = lazy(() => import("../pages/One"));

const Gynaecology = lazy(() => import("../pages/Gynaecology"));
const Academic = lazy(() => import("../pages/Academic"));
const Education = lazy(() => import("../pages/Education"));

const Skin = lazy(() => import("../pages/Skin"));
const Review = lazy(() => import("../pages/Review"));
const Fix = lazy(() => import("../pages/Fix"));
const Bodyt = lazy(() => import("../pages/Babyt"));
const Complaint = lazy(() => import("../pages/Complaint"));
const ByYao = lazy(() => import("../pages/BuyYao"));
const Gravida = lazy(() => import("../pages/Gravida"));
const Tumor = lazy(() => import("../pages/Tumor"));
const Firming = lazy(() => import("../pages/Firming"));
const Certrem = lazy(() => import("../pages/Centrem"));
const Advice = lazy(() => import("../pages/Advice"));
// import Control from "../pages/Control";

// 商品详情
const ShopDetail = lazy(() => import("../pages/Shopdetail"));

const Selice = lazy(() => import("../pages/SerIice"));

// 购物车2
const CartTwo = lazy(() => import("../pages/CartTwo"));
const MyMalllsw = lazy(() => import("../pages/MyMalllsw"));

// 我的页面中的联系客服路由
const ContactCustomerService = lazy(
  () => import("../pages/ContactCustomerService")
);
// 钱包设置页面
const WalletSet = lazy(() => import("../pages/WalletSet"));
// 账单明细
const Bill = lazy(() => import("../pages/Bill"));
// 银行卡
const BankCard = lazy(() => import("../pages/BankCard"));
// 红包
const RedEnvelope = lazy(() => import("../pages/RedEnvelope"));
// 代金券
const Voucher = lazy(() => import("../pages/Voucher"));

// 404页面
const No = lazy(() => import("../pages/404"));
// 拨号
const Phone = lazy(() => import("../pages/Phone"));

const RouterList = [
  {
    path: "/",
    element: <Navigate to="/home/home" />,
  },
  {
    path: "/login",
    element: <Login />,
  },
  {
    path: "/sigin",
    element: <Sigin />,
  },
  {
    path: "/home",
    element: <Home />,
    children: RouterChildrenList,
  },

  {
    path: "/cart",
    element: <Cart />,
  },

  {
    path: "/chu",
    element: <Chu />,
  },
  {
    path: "/zi",
    element: <Zi />,
  },
  {
    path: "/kang",
    element: <Kang />,
  },
  {
    path: "/cang",
    element: <Cang />,
  },
  {
    path: "/fen",
    element: <Fen />,
  },

  {
    path: "/alldepartmentsitem",
    element: <AlldepartmentsItem />,
  },
  {
    path: "/shopsearch",
    element: <ShopSearch />,
  },
  {
    path: "/ask",
    element: <AskPage />,
  },

  {
    path: "/watchvideo",
    element: <WatchVideo />,
  },
  {
    path: "/complaint",
    element: <Complaint />,
  },
  {
    path: "/buyyao",
    element: <ByYao />,
  },
  {
    path: "/gravida",
    element: <Gravida />,
  },

  {
    path: "/cart",
    element: <Cart />,
  },

  {
    path: "/chu",
    element: <Chu />,
  },
  {
    path: "/zi",
    element: <Zi />,
  },
  {
    path: "/kang",
    element: <Kang />,
  },
  {
    path: "/cang",
    element: <Cang />,
  },
  {
    path: "/fen",
    element: <Fen />,
  },
  {
    path: "/alldepartmentsitem",
    element: <AlldepartmentsItem />,
  },
  {
    path: "/kf",
    element: <Kf />,
  },
  {
    path: "/watchvideo",
    element: <WatchVideo />,
  },

  {
    path: "/ask",
    element: <AskPage />,
  },
  {
    path: "/watchvideo",
    element: <WatchVideo />,
  },
  {
    path: "/complaint",
    element: <Complaint />,
  },
  {
    path: "/buyyao",
    element: <ByYao />,
  },
  {
    path: "/gravida",
    element: <Gravida />,
  },

  {
    path: "/sao",
    element: <Sao />,
  },
  {
    path: "/putaway",
    element: <Putaway />,
  },
  {
    path: "/grounds",
    element: <Grounds />,
  },
  {
    path: "/wallet",
    element: <Wallet />,
  },
  {
    path: "/sleep",
    element: <Sleep />,
  },
  {
    path: "/monitor",
    element: <Monitor />,
  },
  {
    path: "/health",
    element: <Health />,
  },
  {
    path: "/blood",
    element: <Blood />,
  },
  {
    path: "/asthma",
    element: <Asthma />,
  },
  {
    path: "/device",
    element: <Device />,
  },
  {
    path: "/butler",
    element: <Butler />,
  },
  {
    path: "/one",
    element: <One />,
  },
  {
    path: "/complaint",
    element: <Complaint />,
  },
  {
    path: "/gynaecology",
    element: <Gynaecology />,
  },
  {
    path: "/academic",
    element: <Academic />,
  },
  {
    path: "/education",
    element: <Education />,
  },

  {
    path: "/skin",
    element: <Skin />,
  },
  {
    path: "/review",
    element: <Review />,
  },
  {
    path: "/fix",
    element: <Fix />,
  },
  {
    path: "/bodyt",
    element: <Bodyt />,
  },
  {
    path: "/kf",
    element: <Kf />,
  },
  {
    path: "/tumor",
    element: <Tumor />,
  },
  {
    path: "/firming",
    element: <Firming />,
  },
  {
    path: "/certrem",
    element: <Certrem />,
  },
  {
    path: "/advice",
    element: <Advice />,
  },
  {
    path: "/tumor",
    element: <Tumor />,
  },
  {
    path: "/contactcustomercervice",
    element: <ContactCustomerService />,
  },
  {
    path: "/walletset",
    element: <WalletSet />,
  },
  {
    path: "/bill",
    element: <Bill />,
  },
  {
    path: "/bankcard",
    element: <BankCard />,
  },
  {
    path: "/redenvelope",
    element: <RedEnvelope />,
  },
  {
    path: "/voucher",
    element: <Voucher />,
  },
  {
    path: "/firming",
    element: <Firming />,
  },
  {
    path: "/certrem",
    element: <Certrem />,
  },
  {
    path: "/advice",
    element: <Advice />,
  },
  {
    path: "/shopdetail",
    element: <ShopDetail />,
  },
  {
    path: "/selice",
    element: <Selice />,
  },
  {
    path: "/carttwo",
    element: <CartTwo />,
  },
  {
    path: "/myMalllsw",
    element: <MyMalllsw />,
  },
  {
    path: "/phone",
    element: <Phone />,
  },
  {
    path: "*",
    element: <No />,
  },
];

export default RouterList.concat(HomeRouterList)
  .concat(SeekingMedicalAttention)
  .concat(livebroadcastRouter)
  .concat(HealthMallRouter);
